/*******************************************OVERVIEW*******************************************************
 
 Political Fear and Loathing on Wall Street
 
 Replication do file
 
Figure 3: VSTG Index Returns, 2006-2020
 
 Version July 9 2023 
 
  
********************************************************************************************************************/

clear
set more off
#delimit ;


/*Set Directory -- You will need to adjust this line of code accordingly */; 


cd "/Users/ssaiegh/Files/Mac/VIX/VIX/";

/*Create Log File*/;

log using "Figure 3", replace text;


/*Load Data File*/;

use "election_risk.dta";


/*Declare Time Series*/;


tsset case;

/*Estimate VSTG Index Returns*/;

gen ret_vstg2=((vstg-L2.vstg)/L2.vstg)*100;
gen ret_vstg3=((vstg-L3.vstg)/L3.vstg)*100;

gen led_ret_vstg3=F.ret_vstg3;

/*Generate Figure 3*/;


collapse ret_vstg2 led_ret_vstg3 if event==1, by(year);

drop if ret_vstg2==.;

tsset year;

tsline ret_vstg2 led_ret_vstg3;

ttest ret_vstg2= led_ret_vstg3 if year<2016;

ttest ret_vstg2= led_ret_vstg3 if year>2015;


log c;
